$(function(){
	/*var specific = $('.gamefield').attr('data-style');
	var spaceh =parseInt($('.gamefield').attr('data-width'));
	var spacev =parseInt($('.gamefield').attr('data-height'));
	spaceh+=5; spacev+=5;
	switch (specific) {
	case 'horizontal': {
		$('.gamefield').css('width', 400 + spaceh + 'px');
		$('.gamefield').css('height', 300 + spacev + 'px');
	}
	    break;
	case 'vertical':{
		$('.gamefield').css('width', 300 + spaceh + 'px');
		$('.gamefield').css('height', 400 + spacev + 'px');
	}
		break;

	default:{
		$('.gamefield').css('width', 400 + spaceh + 'px', 'height', 400 + spaceh + 'px');
	}
		break;
	}
	
		
	$('.gamefield').show();
	$('.gamefield img').draggable();
*/	
	gameFieldTable = '<table><tr>';
	
	for (i=0; i<=imgArr.length; i++){
		console.log(i%separateVert);
		
		
		if(i!=0 && i%separateVert==0 && i!=imgArr.length){
			gameFieldTable +='</tr><tr>'
		} else if(i==imgArr.length){
			gameFieldTable +='</tr>'
		}
		if(i!=imgArr.length){
			gameFieldTable += '<td><img src="'+ imgArr[i] +'"/></td>';
		}else{
			gameFieldTable += '<td></td>';
		}
	}
	gameFieldTable +='</table>';
	
});